<?php
include_once ($_SERVER['DOCUMENT_ROOT'].'/global.php');
$array['tree'] = array();
$array['BuMenArray'] = array();
$sql="SELECT `id`,`IsZhongDuan`,`FatherId`,`level`,`BuMenName` FROM `BuMenTree` where `IsDelete` = 0 ORDER BY `level`,`id`";
$query = $mysqli->query($sql);
while ($a = $query->fetch_assoc()) {
  $array['tree'][] = $a;
}
$sql = "SELECT BuMenId from YongGongJiaoShi where person_id = {$_GET['CurPersonId']}";
$query = $mysqli->query($sql);
while ($a = $query->fetch_assoc()) {
  $array['BuMenArray'][] = $a;
}
echo json_encode($array);
exit;
?>

